powered by
Single bracket '[' refers to indices and names within the RasterArray. Use double brackets to replace layers based on their names (in the stack).
'['
RasterArray
# S4 method for RasterArray,ANY,ANY,logical [(x, i, j, ...) <- value# S4 method for RasterArray,ANY,ANY,RasterLayer [(x, i, j, ...) <- value
# S4 method for RasterArray,ANY,ANY,RasterLayer [(x, i, j, ...) <- value
RasterArray object.
subscript of the first dimension(rows) or vector-like subsetting.
subscript of the second dimension (columns).
subscript of additional dimensions.
A RasterLayer or RasterArray object.
RasterLayer
None.
# NOT RUN { data(dems) # replace third element with missing value dems[3] <- NA # duplicate first element and make it the second too dems[2] <-dems[1] # }
Run the code above in your browser using DataLab